﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Template.Master"
    Inherits="System.Web.Mvc.ViewPage<Portal.ISetting>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
      <div region="center" style="width: 500px; height: 100%; padding: 1px; position: relative;
        overflow-y: auto">
        <ul style="display: block; border: 1px solid #C4E7FB; height: 30px; margin: 4px 10px;
            padding: 10px 2px; vertical-align: middle;">
            <li style="padding: 0px; list-style-type: none">
                <label style="display: block; display: inline-block; zoom: 1; _display: inline; vertical-align: middle;
                    width: 100px; text-align: right; padding: 0px 5px 0px 0px;">
                    载入语言:</label>
                <select id="cc" name="Culture" editable="false">
                </select>
                <input type="button" id="load-culture" value="手动加载" style="display: none" />
            </li>
        </ul>
     <div style="background: #fafafa; padding: 10px; height: 100%; position: relative;">
            <form id="ff" method="post" action="<%=Url.Action("Recruitment") %>" novalidate>
            <div style="padding: 10px; position: relative;">
                <textarea name="Recruitment" id="Recruitment" style="width: 800px; height: 400px;"><%=Model.Recruitment %></textarea>
            </div>
            <div align="center" style="padding: 12px;">
                <input type="submit" name="button" value="提交内容" />
            </div>
            </form>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <link rel="stylesheet" href="/Content/Widget/kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript" charset="utf-8" src="/Content/Widget/kindeditor/kindeditor.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Content/Widget/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Content/Widget/kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript">

        KindEditor.ready(function (K) {
            var editor1 = K.create('#Recruitment', {
                cssPath: '/Content/Widget/kindeditor/plugins/code/prettify.css',
                uploadJson: '<%=Url.Action("UploadSettingArticleJson") %>',
                fileManagerJson: '<%=Url.Action("UploadSettingArticleJson") %>',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
        $(function () {
            var culturehref = '/Admin/<%=Model.Culture %>/Setting/Recruitment';
            $('#cc').combobox({
                url: '<%=Url.Action("GetCultureComboBoxJson","System",new{value=Model.Culture}) %>',
                valueField: 'id',
                textField: 'text',
                onSelect: function (record) {
                    culturehref = '/Admin/' + record.id + '/Setting/Recruitment';
                    location.href = '/Admin/' + record.id + '/Setting/Recruitment';
                }
            });
            $("#load-culture").click(function () {
                location.href = culturehref;
            });
        });
    </script>
</asp:Content>
